package com.attendancesystem.model;

public class Unit {
    private int unitId;          // 单元ID
    private String unitName;     // 单元名称
    private String unitDescription; // 单元描述
    private int courseId;        // 所属课程ID
    private int unitDuration;    // 单元时长（小时）

    // 无参构造方法
    public Unit() {
    }

    // 全参数构造方法
    public Unit(int unitId, String unitName, String unitDescription,
                int courseId, int unitDuration) {
        this.unitId = unitId;
        this.unitName = unitName;
        this.unitDescription = unitDescription;
        this.courseId = courseId;
        this.unitDuration = unitDuration;
    }

    // Getter和Setter方法
    public int getUnitId() {
        return unitId;
    }

    public void setUnitId(int unitId) {
        this.unitId = unitId;
    }

    public String getUnitName() {
        return unitName;
    }

    public void setUnitName(String unitName) {
        this.unitName = unitName;
    }

    public String getUnitDescription() {
        return unitDescription;
    }

    public void setUnitDescription(String unitDescription) {
        this.unitDescription = unitDescription;
    }

    public int getCourseId() {
        return courseId;
    }

    public void setCourseId(int courseId) {
        this.courseId = courseId;
    }

    public int getUnitDuration() {
        return unitDuration;
    }

    public void setUnitDuration(int unitDuration) {
        this.unitDuration = unitDuration;
    }

    // toString方法
    @Override
    public String toString() {
        return "Unit{" +
                "unitId=" + unitId +
                ", unitName='" + unitName + '\'' +
                ", unitDescription='" + unitDescription + '\'' +
                ", courseId=" + courseId +
                ", unitDuration=" + unitDuration +
                '}';
    }
}
